<?php
include S_ROOT . '/libraryfiles/upload/library/ChipVN/Loader.php';
\ChipVN\Loader::registerAutoLoad();

// fiter
##################### START CONFIG #######################
// danh sÃ¡ch logo
$logolist = array(
    1 => 'logo1.png',
    2 => 'logo2.png',
    3 => 'logo3.png',
);
// logo
$default['logo'] = 'logo1.png';

// logo (right bottom, right center, right top, left top, .v.v.)
$logoPosition = 'cc';

$default['resize'] = 800;
##################### END CONFIG #######################


$watermarkid = 1;
$watermark = $watermarkid > 0 ? TRUE : FALSE;
$logoPath = null;
//$logoPath = DIR . 'logo/' . (in_array($logoid, array_keys($logolist)) ? $logolist[$logoid] : $default['logo']);
/* get Logo */
//$get_config_logo = select(Tblrefcode::tblname, array(Tblrefcode::value), array(Tblrefcode::name => 'logo', Tblrefcode::type => 'global_setting'));
//$logoPath = mysql_fetch_assoc($get_config_logo);
if (!empty($logoPath)) {
    $logoPath = S_ROOT . '/images/' . $logoPath['ref_value'];
} else {
    $logoPath = S_ROOT . '/images/watermark_logo/logo1.png';
}
/* end get Logo */

$resizeWidth = 200;
$resizeHeight = 150;
/* end insert product image */